import request from '@/utils/request'
// 售货机类型列表(搜索)
export const getVendingTypeSearchAPI = (pageIndex, pageSize, name) => request({
  url: '/vm-service/vmType/search',
  params: {
    pageIndex,
    pageSize,
    name
  }
})

// 图片上传
export const imageUploadAPI = (data) => request({
  url: '/vm-service/sku/fileUpload',
  method: 'POST',
  data
})

// 新增售货机类型
export const addVendingTypeAPI = (data) => request({
  url: '/vm-service/vmType',
  method: 'POST',
  data
})

// 售货机类型修改
export const vendingAmendTypeAPI = (typeId, data) => request({
  url: `/vm-service/vmType/${typeId}`,
  method: 'PUT',
  data
})

// 售货机类型删除
export const getVendingDelAPI = (typeId) => request({
  url: `/vm-service/vmType/${typeId}`,
  method: 'DELETE'
})
